<?php
namespace BP\Sys;

use BP\En\EntityMyPK;

require_once("BP/En/Map.php");
require_once("BP/Web/WebUser.php");
class FrmEle extends EntityMyPK {
	public static $Label;	// String
	public static $Line;	// String
	public static $Button;	// String
	public static $Link;	// String
	public static $HandSiganture;	// String
	public static $EleSiganture;	// String
	public static $iFrame;	// String
	public static $Fieldset;	// String
	public static $SubThread;	// String
	public static $MapPin;	// String
	public static $Microphonehot;	// String
	public static function __staticinit() { // static class members
		self::$Label = "Label";
		self::$Line = "Line";
		self::$Button = "Button";
		self::$Link = "Link";
		self::$HandSiganture = "HandSiganture";
		self::$EleSiganture = "EleSiganture";
		self::$iFrame = "iFrame";
		self::$Fieldset = "Fieldset";
		self::$SubThread = "SubThread";
		self::$MapPin = "MapPin";
		self::$Microphonehot = "Microphonehot";
	}
	public function getAtPara () 
	{
		return $this->GetValStrByKey("AtPara");
	}
	public function setAtPara ($value) // [String value]
	{
		$this->SetValByKey("AtPara", $value);
	}
	public function getLabText () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$EleName);
	}
	public function setLabText ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleName, $value);
	}
	public function getLabStyle () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$AtPara);
	}
	public function setLabStyle ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$AtPara, $value);
	}
	public function getLinkText () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$EleName);
	}
	public function setLinkText ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleName, $value);
	}
	public function getLinkURL () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag1);
	}
	public function setLinkURL ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag1, $value);
	}
	public function getLinkTarget () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag2);
	}
	public function setLinkTarget ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag2, $value);
	}
	public function getLinkStyle () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$AtPara);
	}
	public function setLinkStyle ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$AtPara, $value);
	}
	public function getLineBorderColor () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag2, "Black");
	}
	public function setLineBorderColor ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag2, $value);
	}
	public function getLineBorderWidth () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag1, "1");
	}
	public function setLineBorderWidth ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag1, $value);
	}
	public function getLineX1 () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$X);
	}
	public function setLineX1 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$X, $value);
	}
	public function getLineY1 () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Y);
	}
	public function setLineY1 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Y, $value);
	}
	public function getLineX2 () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$W);
	}
	public function setLineX2 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$W, $value);
	}
	public function getLineY2 () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$H);
	}
	public function setLineY2 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$H, $value);
	}
	public function getBtnID () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$EleID);
	}
	public function setBtnID ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleID, $value);
	}
	public function getBtnText () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$EleName);
	}
	public function setBtnText ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleName, $value);
	}
	public function getBtnType () 
	{
		return $this->GetValIntByKey(FrmEleAttr::$Tag1);
	}
	public function setBtnType ($value) // [int value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag1, $value);
	}
	public function getBtnEventType () 
	{
		return BtnEventType->forValue($this->getBtnType());
	}
	public function getBtnEventContext () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag2);
	}
	public function setBtnEventContext ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag2, $value);
	}
	public function getImgPath () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag1);
	}
	public function setImgPath ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag1, $value);
	}
	public function getImgLinkUrl () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag2);
	}
	public function setImgLinkUrl ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag2, $value);
	}
	public function getImgLinkTarget () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag3);
	}
	public function setImgLinkTarget ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag3, $value);
	}
	public function getSealID () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$EleID);
	}
	public function setSealID ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleID, $value);
	}
	public function getSealName () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$EleName);
	}
	public function setSealName ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleName, $value);
	}
	public function getSealStations () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag1);
	}
	public function setSealStations ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag1, $value);
	}
	public function getSealSrcType () 
	{
		return $this->GetParaInt(FrmEleAttr::$SrcType);
	}
	public function setSealSrcType ($value) // [int value]
	{
		$this->SetPara(FrmEleAttr::$SrcType, $value);
	}
	public function getSealIsEdit () 
	{
		return $this->GetParaBoolen(FrmImgAttr::$IsEdit);
	}
	public function setSealIsEdit ($value) // [boolean value]
	{
		$this->SetPara(FrmImgAttr::$IsEdit, $value);
	}
	public function getHandSigantureSavePath () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag1);
	}
	public function getHandSiganture_WinOpenH () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag2);
	}
	public function getHandSiganture_WinOpenW () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag3);
	}
	public function getHandSiganture_UrlPath () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$Tag4);
	}
	public function getIsEnable () 
	{
		return $this->GetValBooleanByKey(FrmEleAttr::$IsEnable);
	}
	public function setIsEnable ($value) // [boolean value]
	{
		$this->SetValByKey(FrmEleAttr::$IsEnable, $value);
	}
	public function getEleID () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$EleID);
	}
	public function setEleID ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleID, $value);
	}
	public function getEleName () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$EleName);
	}
	public function setEleName ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleName, $value);
	}
	public function getTag1 () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag1);
	}
	public function setTag1 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag1, $value);
	}
	public function getTag2 () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag2);
	}
	public function setTag2 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag2, $value);
	}
	public function getTag3 () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag3);
	}
	public function setTag3 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag3, $value);
	}
	public function getTag4 () 
	{
		return $this->GetValStringByKey(FrmEleAttr::$Tag4);
	}
	public function setTag4 ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$Tag4, $value);
	}
	public function getFK_MapData () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$FK_MapData);
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$FK_MapData, $value);
	}
	public function getEleType () 
	{
		return $this->GetValStrByKey(FrmEleAttr::$EleType);
	}
	public function setEleType ($value) // [String value]
	{
		$this->SetValByKey(FrmEleAttr::$EleType, $value);
	}
	public function getX () 
	{
		return $this->GetValFloatByKey(FrmEleAttr::$X);
	}
	public function setX ($value) // [float value]
	{
		$this->SetValByKey(FrmEleAttr::$X, $value);
	}
	public function getY () 
	{
		return $this->GetValFloatByKey(FrmEleAttr::$Y);
	}
	public function setY ($value) // [float value]
	{
		$this->SetValByKey(FrmEleAttr::$Y, $value);
	}
	public function getH () 
	{
		return $this->GetValFloatByKey(FrmEleAttr::$H);
	}
	public function setH ($value) // [float value]
	{
		$this->SetValByKey(FrmEleAttr::$H, $value);
	}
	public function getW () 
	{
		return $this->GetValFloatByKey(FrmEleAttr::$W);
	}
	public function setW ($value) // [float value]
	{
		$this->SetValByKey(FrmEleAttr::$W, $value);
	}
	public function getHOfInt () 
	{
		return $Integer->parseInt((new Float($this->getH())));
	}
	public function getWOfInt () 
	{
		return $Integer->parseInt((new Float($this->getW())));
	}
	public function getHisUAC () 
	{
		$uac = new UAC();
		if ($WebUser->getNo()->equals("admin"))
		{
			$uac->IsDelete =  TRUE ;
			$uac->IsUpdate =  TRUE ;
			$uac->IsInsert =  FALSE ;
			$uac->IsView =  TRUE ;
		}
		else
		{
			$uac->IsView =  TRUE ;
		}
		$uac->IsImp =  TRUE ;
		return $uac;
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($mypk) // [String mypk]
	{
		$me = new self();
		$me->setMyPK($mypk);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_FrmEle", "表单元素扩展");
		$map->Java_SetDepositaryOfEntity($Depositary->None);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetEnType($EnType->Sys);
		$map->IndexField = FrmEleAttr::$FK_MapData;
		$map->AddMyPK();
		$map->AddTBString(FrmEleAttr::$FK_MapData, NULL, "表单ID",  TRUE ,  FALSE , 1, 100, 20);
		$map->AddTBString(FrmEleAttr::$EleType, NULL, "类型",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmEleAttr::$EleID, NULL, "控件ID�?(对部分控件有�?)",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmEleAttr::$EleName, NULL, "控件名称(对部分控件有�?)",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddTBFloat(FrmEleAttr::$X, 5, "X",  TRUE ,  FALSE );
		$map->AddTBFloat(FrmEleAttr::$Y, 5, "Y",  FALSE ,  FALSE );
		$map->AddTBFloat(FrmEleAttr::$H, 20, "H",  TRUE ,  FALSE );
		$map->AddTBFloat(FrmEleAttr::$W, 20, "W",  FALSE ,  FALSE );
		$map->AddTBString(FrmEleAttr::$Tag1, NULL, "链接URL",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmEleAttr::$Tag2, NULL, "Tag2",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmEleAttr::$Tag3, NULL, "Tag3",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmEleAttr::$Tag4, NULL, "Tag4",  TRUE ,  FALSE , 0, 50, 20);
		$map->AddTBString(FrmEleAttr::$GUID, NULL, "GUID",  TRUE ,  FALSE , 0, 128, 20);
		$map->AddTBInt(FrmEleAttr::$IsEnable, 1, "是否启用",  FALSE ,  FALSE );
		$map->AddTBAtParas(4000);
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeUpdateInsertAction () 
	{
		if (!$this->getEleID()->equals(""))
		{
			$this->setMyPK((((($this->getFK_MapData() . "_") . $this->getEleType()) . "_") . $this->getEleID()));
		}
		else
		{
			$this->setMyPK((($this->getFK_MapData() . "_") . $this->getEleType()));
		}
		return parent->beforeUpdateInsertAction();
	}
}
FrmEle::__staticinit(); // initialize static vars for this class on load
?>
